//
//  NSArray+QSExtension.m
//  myTest
//
//  Created by Song on 2018/9/19.
//  Copyright © 2018年 Song. All rights reserved.
//

#import "NSArray+QSExtension.h"

@implementation NSArray (QSExtension)
/**
 反转数组
 */
- (NSArray *)qs_reverseArray
{
    NSInteger mid = self.count / 2;
    
    NSMutableArray *tempArray = [[NSMutableArray alloc] initWithArray:self];
    for (int i = 0; i < mid; i++) {
        [tempArray exchangeObjectAtIndex:i withObjectAtIndex:self.count - (i + 1)];
    }
    
    return [[NSArray alloc] initWithArray:tempArray];
}
@end
